package util;

import java.util.Locale;
import java.util.ResourceBundle;

public class CategoryHelper {
	private static ResourceBundle resource;

	public static String getByAlias(String alias) {
		resource = ResourceBundle.getBundle("category", new Locale("vi"));
		try {
			String result = resource.getString(alias);
			if (result == null) {
				return alias;
			} else {
				return result;
			}

		} catch (Exception e) {
			return alias;
		}
	}

	public static void main(String[] args) {
		System.out.println(getByAlias("nhip-dieu-tre"));
	}
}
